package com.woniuxy.entity;

import java.util.Date;

/**
 * 对应数据的账号表 account
 */
public class Account {
    int id;
    //登录账号名
    String username;
    //登录密码
    String password;
    //userid
    int userid;//通过我们直接通过连表查询，把用户信息放进去
    //UserInfo 这个用来存放用户信息
    static UserInfo userInfo = new UserInfo();
    //创建时间
    Date createTime;

    public Account() {
    }

    public Account(String username, String password, int userid) {
        this.username = username;
        this.password = password;
        this.userid = userid;
    }

    public Account(int id, String username, String password, int userid, Date createTime) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.userid = userid;
        this.createTime = createTime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getUserid() {
        return userid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public static UserInfo getUserInfo() {
        return userInfo;
    }

    public static void setUserInfo(UserInfo userInfo) {
        Account.userInfo = userInfo;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Account{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", userid=" + userid +
                ", userInfo=" + userInfo +
                ", createTime=" + createTime +
                '}';
    }
}
